<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <link href="css/login.css" rel="stylesheet" type="text/css" />
        <title>Admin Panel Login</title>
    </h:head>
    <h:body>
        <h:form>
            <img src="css/images/logo2.png" alt="logo" style="padding: 0 0 0 400px"></img>
        <table id="login">
            <tr>
                <td>                    
                    <h1>Admin Panel Login</h1>
                    <hr style="color:#256c89"/>
                    <table>
                        <tr>
                            <td>UserName</td>
                            <td><p:inputText id="userName" value="#{managedBeanAdmin.username}" required="true"/></td>
                            <td><p:message for="userName" display="icon"/></td>
                        </tr>
                        <tr>
                            <td>Password</td>
                            <td><p:password id="password" feedback="false" value="#{managedBeanAdmin.password}" minLength="6" required="true"/></td>
                            <td><p:message for="password" display="icon"/></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td class="login_btn">
                                <h:commandButton value="Login" action="#{managedBeanAdmin.checkLogin}"/>
                            </td>
                        </tr>
                    </table>
                    <c:if test="#{managedBeanAdmin.result.equals('login.xhtml')}" >
                        <samp style="color: red;font-weight: bold;float: left"> * Login false!</samp>
                    </c:if>
                </td>
            </tr>
        </table>
        </h:form>
    </h:body>
</html>

